<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="./js/vue.js"></script>
	</head>
	<body>
		<div id="app">
		<button @click="btnMinus">-</button>
		<span>{{n}}</span>
		<button @click="btnAdd">+</button>
		</div>
		
		<script type="text/javascript">
			var vm=new Vue({
				el:"#app",
				data:{
					n:0,
				},
				
				methods:{
					btnAdd(){
						this.n++;
					},
					btnMinus(){
						this.n--
					}
				},
			});
		</script>
	</body>
</html>
